
package com.atguigu.gulimall.auth.feign;


import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.authGitee.GiteeUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * 会员服务
 */

@FeignClient("gulimall-member")
public interface MemberFeignService {


    /**
     * 注册
     */

    @PostMapping("/member/member/regist")
    //远程服务调用对象会转为json,@RequestBody使json可以转为对象
    R regist(@RequestBody UserRegistVo vo);


    /**
     * 登录
     */

    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);


    /**
     * 社交登录
     */

    @PostMapping("/member/member/gitee/oauth2/login")
    public R oauth2Login(@RequestBody GiteeUser giteeUser);

}
